package com.woniuxy.stage3demo.controller.controllerhpd;


import com.woniuxy.stage3demo.bean.hpd.ProductCheckLogBean;
import com.woniuxy.stage3demo.service.servicehpd.IProductCheckLogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("/productCheckLog")
@RestController
public class ProductCheckLogController {
    @Resource
    private IProductCheckLogService productCheckLogServiceImpl;

    /*@GetMapping(value = "/page/{id}",produces = {"application/json;charset=utf-8"})
    public ResultMsg findByProId(@PathVariable("id") Long id){
        ResultMsg res = new ResultMsg(200,"操作成功",null);
        if(id != null) {
            productCheckLogServiceImpl.findAllCheckResult(id);
            return res;
        }else{
            res.setCode(10000);
            res.setMsg("更改失败");
            return res;
        }
    }*/

    @GetMapping(value = "/page",produces = {"application/json;charset=utf-8"})
    public List<ProductCheckLogBean> findByProId(Long id) {
            List<ProductCheckLogBean> allCheckResult = productCheckLogServiceImpl.findAllCheckResult(id);
            return allCheckResult;
    }
}
